﻿<UserControl x:Class="P2.Cuberry.Modules.SimpleAccounting.FiTransaction.FiTransactionsFindView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"    
    Margin="0" MinWidth="100" Width="Auto" MinHeight="320" Height="320">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/P2.Cuberry.Framework.Layout;component/Styles/Styles.xaml"/>                               
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>

    </UserControl.Resources>

    <Grid Keyboard.KeyDown="Control_KeyDown" >

        <Grid.Resources>
            
        </Grid.Resources>


        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="25"/>
            <RowDefinition Height="4" />
            <RowDefinition Height="*"/>
            <RowDefinition Height="2" />
        </Grid.RowDefinitions>


        <Menu Grid.Column="0" Grid.Row="0" x:Name="menuMain" Height="25" VerticalAlignment="Top" Background="{DynamicResource MyBlueBackgroundGradientBrush}" >
            <MenuItem Name="btnFiTransactionFind" Margin="2,4,0,2"  Header="{Translate FiTransactionFind}" x:Uid="btnFiTransactionFind" Command="{Binding FiTransactionFindCommand}"  Style="{StaticResource P2FindMenuItemStyleFind}"/>
            <MenuItem Name="btnFiTransactionClr" Margin="2,4,0,2" Header="{Translate FiTransactionClr}" x:Uid="btnFiTransactionClr" Command="{Binding FiTransactionClrCommand}" Style="{StaticResource P2FindMenuItemStyleClear}"/>
            <MenuItem Name="btnFiTransactionAdd" Margin="2,4,0,2"  Header="{Translate FiTransactionAdd}" x:Uid="btnFiTransactionAdd" Command="{Binding FiTransactionAddCommand}" Style="{StaticResource P2FindMenuItemStyleAdd}"/>
        </Menu>


        <Label Grid.Row="2"  Height="26" Margin="0,5,0,0" Name="BookingIDL" VerticalAlignment="Top" HorizontalAlignment="Left" Width="120" Content="{Translate BookingIDL}" />
        <TextBox Grid.Row="2" Height="25" Margin="118,5,11,0" Text="{Binding BookingID, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}"  Name="FiBookingID" VerticalAlignment="Top" Style="{StaticResource P2TextBoxStyle}"/>

        <Label Grid.Row="2"  Height="26" Margin="0,33,0,0" Name="DocumentNoL" VerticalAlignment="Top" HorizontalAlignment="Left" Width="120" Content="{Translate DocumentNoL}" />
        <TextBox Grid.Row="2" Height="25" Margin="118,33,11,0" Name="DocumentNo" Text="{Binding DocumentNo}" VerticalAlignment="Top" Style="{StaticResource P2TextBoxStyle}"/>


        <Label Grid.Row="2" Height="26" Margin="0,60,0,0" Name="FiscalYearIDL" VerticalAlignment="Top" HorizontalAlignment="Left" Width="120" Tag="SxL"  Content="{Translate FiscalYearIDL}" />
        <ComboBox Grid.Row="2" Height="25" Margin="118,60,11,0" Name="FiscalYearID" ItemsSource="{Binding FiscalYears}" SelectedValue="{Binding FiscalYearID}" VerticalAlignment="Top" SelectedValuePath="FiscalYearID" DisplayMemberPath="FiscalYearName" Style="{StaticResource P2ComboBoxStyle}"  />

        <Label Grid.Row="2" Height="26" Margin="0,88,0,0" Name="BookingDescriptionL" VerticalAlignment="Top" HorizontalAlignment="Left" Width="120" Tag="SxL" Content="{Translate BookingDescriptionL}" />
        <TextBox Grid.Row="2" Height="25" Margin="118,88,11,0" Name="BookingDescription" VerticalAlignment="Top" Text="{Binding BookingDescription}" Style="{StaticResource P2TextBoxStyle}" />

        <Label Grid.Row="2" Height="26" Margin="0,116,0,0" Name="BookingDateStartL" VerticalAlignment="Top" HorizontalAlignment="Left" Width="120" Content="{Translate BookingDateStartL}" />
        <DatePicker Grid.Row="2" Height="25" Margin="118,116,11,0" Name="BookingDateStart" SelectedDate="{Binding BookingDateStart}" VerticalAlignment="Top"  />
        <Label Grid.Row="2" Height="26" Margin="0,146,0,0" Name="BookingDateEndL" VerticalAlignment="Top" HorizontalAlignment="Left" Width="38" Content="{Translate BookingDateEndL}" />
        <DatePicker Grid.Row="2" Height="25" Margin="118,146,11,0" Name="BookingDateEnd" SelectedDate="{Binding BookingDateEnd}" VerticalAlignment="Top"  />

        <Label Grid.Row="2"  Height="26" Margin="0,175,0,0" Name="AccountIDL" VerticalAlignment="Top" HorizontalAlignment="Left" Width="120" Content="{Translate AccountIDL}" />
        <TextBox Grid.Row="2" Height="25" Margin="118,175,61,0" Text="{Binding FiAccountNo, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}"  Name="AccountID" VerticalAlignment="Top" Style="{StaticResource P2TextBoxStyle}" />
        <Button  Name="FindAccountID" Command="{Binding FiTransactionFindAccountCommand}" Grid.Row="2" Height="22" Margin="0,176,36,0"  VerticalAlignment="Top" HorizontalAlignment="Right" Width="22" >
            <Image  Source="/P2.Cuberry.Modules.SimpleAccounting.FiTransaction;component/Images/find16.gif"></Image>
        </Button>
        <Button  Name="FindAccountID2" Command="{Binding FiTransactionFindAccountTreeCommand}" Grid.Row="2" Height="22" Margin="0,176,11,0"  VerticalAlignment="Top" HorizontalAlignment="Right" Width="22" >
            <Image  Source="/P2.Cuberry.Modules.SimpleAccounting.FiTransaction;component/Images/AddChild.png"></Image>
        </Button>

        <Label Grid.Row="2"  Height="26" Margin="0,203,0,0" Name="TotalAmountStartL" VerticalAlignment="Top" HorizontalAlignment="Left" Width="120" Content="{Translate TotalAmountStartL}" />
        <TextBox Grid.Row="2" Height="25" Margin="118,203,11,0" Name="TotalAmountStart" Text="{Binding TotalAmountStart}" VerticalAlignment="Top" Style="{StaticResource P2TextBoxStyle}"/>

        <Label Grid.Row="2"  Height="26" Margin="0,231,0,0" Name="TotalAmountEndL" VerticalAlignment="Top" HorizontalAlignment="Left" Width="120" Content="{Translate TotalAmountEndL}" />
        <TextBox Grid.Row="2" Height="25" Margin="118,231,11,0" Name="TotalAmounEndt" Text="{Binding TotalAmountEnd}" VerticalAlignment="Top" Style="{StaticResource P2TextBoxStyle}"/>

        <Label Grid.Row="2" Height="26" Margin="0,260,0,0" Name="StatusIDL" VerticalAlignment="Top" HorizontalAlignment="Left" Width="120" Tag="SxL"  Content="{Translate StatusIDL}" />
        <ComboBox Grid.Row="2" Height="25" Margin="118,260,11,0" Name="StatusID" ItemsSource="{Binding WorkflowStatusses}" SelectedValue="{Binding StatusID}" VerticalAlignment="Top" SelectedValuePath="StatusID" DisplayMemberPath="StatusNameCur" Style="{StaticResource P2ComboBoxStyle}" />
        
    </Grid>
</UserControl>
